
GTEST_HOME := $(PWD)/googletest/_install

CXXFLAGS := -isystem $(GTEST_HOME)/include -I$(GTEST_HOME) -L$(GTEST_HOME)/lib -I$(DIS_DIR) -L$(DIS_DIR)
LDFLAGS += -lgtest -lgtest_main -ldl

UNI_TESTS    := example-test.o
TARGETS      :=

all: $(GTEST_HOME) run

run: test_main
	./test_main
	
test_main: $(UNI_TESTS) $(TARGETS)
	g++ $(CXXFLAGS) -pthread $^ $(LDFLAGS)    -o $@

$(GTEST_HOME):
	./build_gtest.sh

clean:
	rm test_main *.o